#!/usr/bin/python
# -*- coding: UTF-8 -*-
import os
try:
    for root, dirs, files in os.walk(r"E:\learning\practice_all"):
        print("\033[1;31m-" * 8, "directory", "<%s>\033[0m" % root, "\033[1;31m-" * 8, "\033[0m" )
        for directory in dirs:
            print("\033[1;34m<DIR>""\t""%s\033[0m" % directory)
        for file in files:
            # print("\033[1;34m<file>  \033[0m" )
            print("\t\t%s" % file)
except OSError as ex:
    print(ex)